package dylan.demo;

import net.sf.json.JSONObject;
import dylna.entity.Student;

public class Main {
	public static void main(String[] args) {
		Student student = new Student("cb", 24, "04050102"); 
		JSONObject object =	JSONObject.fromObject(student);
		String json = object.toString();
		System.out.println(json);
		JSONObject jO = JSONObject.fromObject(object.toString());
		Object object2 = JSONObject.toBean(jO, Student.class);
		Student student2  = (Student)object2;
		System.out.println(student2.getClassName());
	}
}
